<?php
/**
 * 测试控件
 * defaultcontroller.php
 * 
 * Create on 
 * Create by yuebin
 */
namespace haibao\cms\business\control\pc;

class TestController extends \haibao\cms\business\control\Base{
	
	public function __construct($updateTime = null,$controlId,$isPublish){
		parent::__construct($updateTime,$controlId,$isPublish);
	}
	
	
	/**
	 * 获取模版内容
	 * @param : String $content
	 */
	public function displayTemplateHtml(){

		$controlData = $this->getParameter(self::$CONTROL_DATA);
		$content = $this->getParameter(self::$CONTROL_CONTENT);
		
		$id = $controlData['manual']['publishId'];
		file_put_contents(\haibao\frame\Environment::path().'/web/logs/test.log', '------------publishId = '.$id."\n",FILE_APPEND);
		$this->assign('publishId',$id);
		
		$path = $this->generateHtmlPath(__CLASS__,$id);
		file_put_contents(\haibao\frame\Environment::path().'/web/logs/test.log', '------------content = '.$content."\n",FILE_APPEND);
		$this->generateHtml($path,$content);
		file_put_contents(\haibao\frame\Environment::path().'/web/logs/test.log', '------------path = '.$path."\n",FILE_APPEND);

		$con1 = $this->getHtml($path);
		file_put_contents(\haibao\frame\Environment::path().'/web/logs/test.log', '------------finalcon = '.$con1."\n",FILE_APPEND);
		return $con1;
	}
}